<%@page import="com.bstek.urule.law.entity.CaseInfo"%>
<%@page import="com.bstek.urule.runtime.KnowledgeSession"%>
<%@page import="com.bstek.urule.runtime.KnowledgeSessionFactory"%>
<%@page import="com.bstek.urule.runtime.KnowledgePackage"%>
<%@page import="com.bstek.urule.runtime.service.KnowledgeService"%>
<%@page import="org.springframework.context.ApplicationContext"%>
<%@page import="org.springframework.web.context.support.WebApplicationContextUtils"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<%
		ApplicationContext ac = WebApplicationContextUtils.getRequiredWebApplicationContext(application);
		KnowledgeService ks = (KnowledgeService) ac.getBean(KnowledgeService.BEAN_ID);
		KnowledgePackage kp = ks.getKnowledge("demo/ test");
		KnowledgeSession se = KnowledgeSessionFactory.newKnowledgeSession(kp);
		CaseInfo cInfo = new CaseInfo();
		cInfo.setXmJc(true);
		se.insert(cInfo);
		se.fireRules();
		out.print(cInfo.getCaseType());
	%>
</body>
</html>